<cfcomponent displayname="ORM Service" hint="ORM Service" output="false">

<cffunction name="addIncludes">
  <cfinclude template="../demo_includes.cfm" />
</cffunction>

<cffunction name="init">
	<cfargument name="listenport" default="2525" />
	<cfscript>
		var incs = addIncludes();
	  var subethasmtpService = includes.subethasmtpService.init(listenport);
    variables.subethasmtpService = subethasmtpService;
		return this;
	</cfscript>
</cffunction>

<cffunction name="startserver">
	<cfreturn variables.subethasmtpService.startserver() />
</cffunction>

<cffunction name="stopserver">
	<cfreturn variables.subethasmtpService.stopserver() />
</cffunction>

<cffunction name="getMessagesAsStruct">
	<cfreturn variables.subethasmtpService.getMessagesAsStruct() />
</cffunction>

<cffunction name="clearmessages">
	<cfreturn variables.subethasmtpService.clearmessages() />
</cffunction>

<cffunction name="testmessage">
	<cfreturn variables.subethasmtpService.testmessage(delayseconds=2) />
</cffunction>

<cffunction name="dumpvar">
  <cfargument name="var" default="blank">
  <cfargument name="abort" default="true">
  <cftry>
	  <cfdump var="#var#">
	<cfcatch>
	  <cfset writeoutput(cfcatch.Message & " " & cfcatch.Detail & " " & cfcatch.TagContext[1].line & " " & cfcatch.stacktrace) />
	</cfcatch>
	</cftry>
	<cfif arguments.abort>
	  <cfabort />
	</cfif>
</cffunction>


</cfcomponent>